/**
 * @file     task_key.cpp
 * @brief   key reading task for frgui
 * @author    - Adela 
 *            - Robert Zhang <armner@gmail.com>
 *            - 
 * @date   2013-10-25
 *    
 */

 #include "task_key.h"

#include "key_driver.h"
#include "msg_queue.h"

void taskKey( void *pData)
{
    Key key;
    key_driver.open(&key_driver);
    
    while(1)
    {
        if(key_driver.read(&key_driver, &key, sizeof(key), 0))
        {
            msgQue->postMessage(0, key.type, key.value, 0);
        }
    }
}

